/* n bit 2 to 1 multiplexer
usage (5bit 2to1 mux for example) :
MUX_2to1 #(5) U0 (in0, in1, Sel, out);
*/
module MUX_2to1 (D0, D1, S0, Y);
	parameter SIZE=1;
	input [SIZE-1:0] D0, D1;
	input S0;
	output [SIZE-1:0] Y;
	
	assign Y = ( ~{SIZE{S0}} & D0 ) | ( {SIZE{S0}} & D1);
	
endmodule